<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="ZH-CN">
<head>
<title>论文选题汇总查询</title>
<meta http-equiv="X-UA-Compatible" content="IE=9" >
<meta name="keywords" content="吉珠,吉林大学,吉林大学珠海学院,吉林大学珠海学院论文管理">
<meta name="content-type" content="text/html" charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<link rel="stylesheet" href=".//css/bootstrap.css" type="text/css">
<link rel="stylesheet" href=".//css/flow.css" type="text/css">
<script src=".//js/jquery-2.1.1.js" type="text/javascript"></script>
<script src=".//js/bootstrap.js" type="text/javascript"></script>
<style>
.col-xs-3 {
	padding: 1px;
	height:860px;
}
.col-xs-9 {
	height: 860px;
}
#table1{
	margin-top:10px;}
#xs12 {
	height: 754px;
	width: 313px;
}
#li1{
	list-style-type:none;
	 }
</style>
<script type="text/javascript" language="javascript">
function g(o){return document.getElementById(o);}
function hoverli(n){
for(var i=1;i<=28;i++){
{g('tb_'+i).className='';}
g('tb_'+n).className='actived';}
}
function show(id){
var traget=document.getElementById(id);
traget.style.display="block"; 
}

function hide(id){
var traget=document.getElementById(id);
traget.style.display="none"; 
}

//后台代码开始----------------------------------------------------------
 $(function () {
            $("#dg").datagrid({
                url: '<%=request.getContextPath()%>/secretary-KickOpenReportTable',
                singleSelect: true,
                striped:true,
                showFooter:true,
                pagination: true,
                pageSize: 10,
                pageList: [5, 10],
                toolbar:"#tb",
                   onLoadSuccess:function(data){
                   //alert("aaa");
						if(data.total===0){
	             $.messager.alert('提示','数据不存在!');
					}
			},
            columns: [[{
                field: "student_no",
                title: "学号",
                align:'center',
                width: 100,
                
            }, {
                field: "student_name",
                title: "姓名",
                align:'center',
                width: 100
            },  {
                field: "student_xzb",
                title: "班级",
                align:'center',
                width: 100
            }, {
                field: "student_level",
                title: "学历",
                align:'center',
                width: 70,
                  formatter : function(value, row, index) {
							if(value===null||value==="")
							return "<p><font color='#FF5511'>无记录</font></p>";
							return value;
							}
            },{
                field: "thesistitle_name",
                title: "课题名称",
                align:'center',
                width: 180,
                  formatter : function(value, row, index) {
							if(value===null)
							return "<p><font color='#FF5511'>无记录</font></p>";
							return value;
							}
            }, {
                field: "teacher_name",
                title: "指导老师",
                align:'center',
                width: 80
            }, {
                field: "zhicheng_name",
                title: "职称",
                align:'center',
                width: 80,
                  formatter : function(value, row, index) {
							if(value===null)
							return "<p><font color='#FF5511'>无记录</font></p>";
							return value;
							}
            }, {
                field: "zhiwu_name",
                title: "职务",
                align:'center',
                width: 80,
                  formatter : function(value, row, index) {
							if(value===null)
							return "<p><font color='#FF5511'>无记录</font></p>";
							return value;
							}
            } ]],
            });//datagrid
 
 
     
 
        });
 
     function doSearch(){
		$('#dg').datagrid('load',{
			stuno: $('#stuno').val(),
			stuname: $('#stuname').val(),
			stuxzb: $('#stuxzb').val(),
			teacher: $('#teacher').val()
		});
	}
	   function reset(){
		 var traget=document.getElementById("stuno");
		 traget.value="";
		 traget=document.getElementById("stuname");
		 traget.value="";
		 traget=document.getElementById("stuxzb");
		 traget.value="";
		 traget=document.getElementById("teacher");
		 traget.value="";
		$('#dg').datagrid('load',{
			stuno:"",
			stuname: "",
			stuxzb: "",
			teacher: ""
		});
	}
	
	//表格下载------------------------------------------------
		 function DownLoad(type){
	 //alert(type);
	 var xzb;
	 if(type==="single")
	 {
	   xzb=$('#xzb').combobox('getText');
          tableName='#GroupTable';  
          if(xzb===""||xzb===null){  
          $.messager.alert('提示','请选择班级!');
				return false;  
						}  
        }else xzb="";
           if(confirm("确定要导出对应的表格吗?")){  
           var url=null;
          url="<%=request.getContextPath()%>/secretary-ThesisTitlePOI";
          var form=$("<form>");//定义一个form表单
			form.attr("style","display:none");
			form.attr("target","");
			form.attr("method","post");
			form.attr("action", url);
			var input1=$("<input>");
			input1.attr("type","hidden");
			input1.attr("name","xzb");
			input1.attr("value",xzb);
			$("body").append(form);//将表单放置在web中
			form.append(input1);
			form.submit();//表单提交 
			 };
	 }
	 //表格下载结束------------------------------------------------------------
//后台代码结束---------------------------------------------------

     		function showWhat()
		{
			var collap=document.getElementById('collapseHelp');
			if(collap.style.display=='none')
				collap.style.display='block';
			else
				collap.style.display='none';
		}
</script>
</head>

<body>
<!--全局框架 开始 conteiner-->
<div class="container">
<!--标题头图片-->
<div class="row">
  <div class="body_top"> <img src="img/head.png" align="center" width="1280px"/> </div>
</div>
<!--全局12栅格 规划全局区域图线 开始 row+ col-->
<div class="row">
    <jsp:include page="secretary_siderbar.jsp"></jsp:include>
    <!--左侧跳转框架结束--> 
    <!--右侧用户操作模块 占全局9栅格-->
    <div class="col-xs-9"style="border:2px solid #25465d">
      <div class="row">
        <div class="col-xs-4  xs11" style="margin-top:2px; margin-bottom:0px;"> <strong><font size="3">&nbsp&nbsp&nbsp流程管理》论文选题汇总查询 </font></strong> </div>
      </div>
      <div class="col-xs-11  xs11" style="margin-top:2px; margin-bottom:0px;">
        <div class="panel panel-default" style="margin-top:2px; margin-bottom:10px;">
          <div class="panel-heading" align="left"> <a data-toggle="collapse" data-parent="#accordion"  href="#collapseHelp" class="glyphicon glyphicon-chevron-down" onclick="showWhat()"> 操作指南 </a> </div>
          <div id="collapseHelp" class="panel-collapse collapse">
            <div class="panel-body">论文选题汇总查询：
              <ul>
                <li>教学秘书可以通过查询按键，按照教师来查询每个教师或所有教师指导学生的选题情况，也可以按照班级来查询每个班级或所有班级学生论文选题的情况。</li><br />
                <li>可以查询某个班级的所有学生选题情况，也可以查询某个单个同学的选题情况。</li>
                <li>教学秘书可以通过点击导出excel汇总表格按键，来导出本单位论文选题的汇总表。</li> 
              </ul>
            </div>
          </div>
        </div>
        <div class="col-xs-12" style="margin-top:5px; margin-bottom:10px; height:250px;" >
       <!-- 后台代码开始 -->

<div style="height:45px;width:800px;float:center">
     <h4><span class="label label-primary">选题汇总表格下载</span>
    <input  class="easyui-combobox" id="xzb" name="xzb" data-options="url:'<%=request.getContextPath()%>/secretary-GetDepartmentXZB',panelWidth: '120px', panelHeight: 'auto',valueField:'student_xzb',textField:'student_xzb',editable:false">
  <button type="button" class="btn btn-info" onclick="DownLoad('single')">单选下载班级选题</button>
  <button type="button" class="btn btn-danger" onclick="DownLoad('list')">一键下载全系选题汇总</button>
  </h4>
</div>

      <div class="panel panel-info" style="height:430px;width:800px;float:center">
  <div class="panel-heading">选题汇总信息表</div>
  <div class="panel-body">
               
                <div id="tb">
		&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span>学号:</span>
		<input id="stuno" style="line-height:26px;width:90px;float:center">
		&nbsp;&nbsp;<span>姓名:</span>
		<input id="stuname" style="line-height:26px;width:90px;float:center">
		&nbsp;&nbsp;<span>班级:</span>
		<input id="stuxzb" style="line-height:26px;width:90px;float:center">
		&nbsp;&nbsp;<span>教师:</span>
		<input id="teacher" style="line-height:26px;width:90px;float:center">
		<button type="button" class="btn btn-success"  onclick="doSearch()">搜索</button>
		<button type="button" class="btn btn-warning"  onclick="reset()">重置</button>
	        </div>
  				<table id="dg"></table>
        </div>
        </div>
       
       
        <!-- 后台代码结束 -->
            </div>  
      
        </div>
          </div>
          </div>
    
      
      <!--修改结束--> 
    </div>
    <!--全局12栅格 规划全局区域图线 结束 row+ col--> 
  </div>
  <div class="row" style="background-color:#25465d"">
    <p  align="center" style="color:white;background-color:#25465d"><strong>用户单位：</strong>吉林大学珠海学院&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<strong>版权所有：</strong>吉林大学珠海学院计算机科学与技术系</p>
  </div>
  <!--全局框架结束 conteiner--> 
</div>
</body>
</html>
